import { createWebHashHistory, createRouter } from "vue-router";

const Home = () => import("../views/gzt_Home/Home.vue");
const Video = () => import("../views/wk_Video/Video.vue");
const Message = () => import("../views/ssb_Message/Message.vue");
const My = () => import("../views/zsy_My/My.vue");
const Login = () => import("../views/swk_Login/Login.vue");
const Show = () => import("../views/swk_Login/Show.vue");
const PasswordLogin = () => import("../views/swk_Login/PasswordLogin.vue");
const FindPassword = () => import("../views/swk_Login/FindPassword.vue");
const EmailFind = () => import("../views/swk_Login/EmailFind.vue");

const routes = [
  {
    path: "/",
    redirect: "/show"
  },
  {
    path: "/cdn",
    component: () => import("../views/CDN.vue"),
    children: [
      {
        path: "/cdn",
        redirect: "/cdn/home"
      },
      {
        path: "/cdn/home",
        component: Home
      },
      {
        path: "/cdn/video",
        component: Video, //视频页面---王凯负责
        children:[
          {
            path: "/cdn/video/video_list",
            component:import("../views/wk_Video/wk_Video_home.vue")
          }
        ]
      },
      {
        path: "/cdn/message",
        component: Message //消息页面---孙少波负责
      },
      {
        path: "/cdn/my",
        component: My //我的页面---周室伊负责
      }
    ]
  },
  {
    path: "/login",
    component: Login //登入页面---邵文凯负责
  },
  {
    path: "/findpassword",
    component: FindPassword //找回密码---邵文凯负责
  },
  {
    path: "/passwordlogin",
    component: PasswordLogin //密码登入页面---邵文凯负责
  },
  {
    path: "/findemailPassword",
    component: EmailFind //邮箱找回页面---邵文凯负责
  },
  {
    path: "/show",
    component: Show //启动页面---邵文凯负责
  },
  {
    path: "/search",
    component: () => import("../views/gzt_Home/Search.vue") //搜索页面---郭周童负责
  },
  {
    path:"/video/video_search",
    component:import ("../views/wk_Video/wk_Video_search.vue")
  },
  {
    path:"/video/video_detail",
    component:import ("../views/wk_Video/video_detail.vue")
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
